package cn.seqdata.cxf.converter;

import javax.ws.rs.ext.ParamConverter;

import org.joda.time.LocalDateTime;
import org.joda.time.format.ISODateTimeFormat;

public class LocalDateTimeConverter implements ParamConverter<LocalDateTime> {

	@Override
	public LocalDateTime fromString(String value) {
		return LocalDateTime.parse(value, ISODateTimeFormat.dateOptionalTimeParser());
	}

	@Override
	public String toString(LocalDateTime value) {
		return value.toString();
	}
}
